package com.songlanyun.modules.marketing.groupbuy.controller.admin;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import com.songlanyun.common.validator.ValidatorUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.songlanyun.modules.marketing.groupbuy.entity.GroupBuyGoodsSku;
import com.songlanyun.modules.marketing.groupbuy.service.GroupBuyGoodsSkuService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;


/**
 * 拼团商品的规格表
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-27 14:03:39
 */
@RestController
@RequestMapping("admin/groupbuy/sku")
public class GroupBuyGoodsSkuAdminController {
    @Autowired
    private GroupBuyGoodsSkuService groupBuyGoodsSkuService;


    @GetMapping("/list/{groupBuyGoodsId}")
    public R list(@PathVariable("groupBuyGoodsId") Long groupBuyGoodsId) {
        List<GroupBuyGoodsSku> list = groupBuyGoodsSkuService.listByGoodIds(groupBuyGoodsId);

        return R.ok().put("list", list);
    }
}
